package cn.jyc.ssm03.service;

import cn.jyc.ssm03.dao.MenuListMapper;
import cn.jyc.ssm03.pojo.MenuList;
import cn.jyc.ssm03.utils.JsonUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MenuListService {
    @Autowired
    private MenuListMapper mlm;

    public String getMenu() {
        List<MenuList> menus = mlm.getMenu();
        return JsonUtil.objectToJson(menus);
    }

    public String getMenu2(Integer uid) {
        List<MenuList> menus = mlm.getMenu2(uid);
        return JsonUtil.objectToJson(menus);
    }
}
